<?php
if(!function_exists('success'))
{
    function success($msg="",$data="",$code=200)
    {
        return json_encode([
           'msg'=>$msg,
           'data'=>$data,
           'code'=>$code
        ]);
    }
}
if(!function_exists('fail'))
{
    function fail($msg="",$data="",$code=600)
    {
        return json_encode([
            'msg'=>$msg,
            'data'=>$data,
            'code'=>$code
        ]);
    }
}
